let temp = 0
let header = document.querySelectorAll('.headernei span')
for (let i = 0; i < header.length; i++) {
    header[i].addEventListener('click', function () {
        header[temp].classList.remove('yellow')
        temp = i
        header[i].classList.add('yellow')
        document.querySelector(`#q${i + 1}`).scrollIntoView({ behavior: "smooth" })
    })
}
for (let i = 0; i < header.length; i++) {
    header[i].addEventListener('mouseover', function () {
        header[i].classList.add('yel')

    })
    header[i].addEventListener('mouseleave', function () {
        header[i].classList.remove('yel')
    })
}